<template>
	<view class="bg">
		<view class="logobg">
			<view class="line">
				<image class="logo" src="../../static/shejilogo.png"></image>
			</view>

			<view style="height: 60vw;"></view>
		</view>

		<view class="line" @click="click(1)">
			<view class="btnBlue1 textwhite14 line">
				登录
			</view>
		</view>
		<view class="line marginTop2">

			<view class="btnWhite textblack14 line" @click="click(2)">
				<image class="wechatlogo" src="../../static/wechat.png"></image>
				<text class="marginLeft">微信授权登录</text>
			</view>
		</view>

		<view class="line marginTop2 ">
			<view class="btnNone textwhite14 line" @click="click(3)">
				注册
			</view>
		</view>

		<view style="height: 10vh;"></view>

		<view class="line textwhite14">产品设计智能生成式 AI</view>
		<view class="line textwhite14">WWW.SHEJIAI.CC</view>

		<view style="height: 5vh;"></view>

	</view>
</template>

<script>
	export default {
		onLoad: function() {
			var name = uni.getStorageSync("name");
			if (name) {
              uni.switchTab({
              	url:"/pages/HomePage/HomePage"
              })
			}
		},
		
		onShareAppMessage(res) {
			return {
				title: '设辑-产品设计智能生成AI',
				path: '/pages/HomePage/HomePage',
				imageUrl: '/static/black-logo.png'
			}
		},
		// 自定义页面的分享到朋友圈
		onShareTimeline(res) {
			return {
				title: '设辑-产品设计智能生成AI',
				path: '/pages/HomePage/HomePage',
				imageUrl: '/static/black-logo.png'
			}
		},

		data() {
			return {

			}
		},
		methods: {
			click(num) {

				switch (num) {
					case 1:
						uni.navigateTo({
							url: "/pages/Login/Login"
						})
						break
					case 2:
						uni.showToast({
							title: "开发中"
						})
						break
					case 3:
						uni.navigateTo({
							url: "/pages/Login/BindPhone"
						})
						break
				}
			}

		}
	}
</script>

<style>
	@import url("../../common/uni.css");

	.logobg {
		background: url("../../static/welcomebg.png");
		background-size: 100% auto;
		background-repeat: no-repeat;
	}

	.logo {

		margin: 0 auto;
		min-width: 320rpx;
		margin-top: 20vw;
	}

	.wechatlogo {
		width: 24rpx;
		height: 24rpx;
	}

	.img {
		width: 100%;
	}

	.bg {
		min-height: 100vh;
		background-color: black;
	}
	
	.btnWhite {
		width: 288rpx;
		height: 46rpx;
		border-radius: 100rpx 100rpx 100rpx 100rpx;
		background: #FFFFFF;
	}

	.btnNone {
		width: 288rpx;
		height: 46rpx;
		border-radius: 100rpx 100rpx 100rpx 100rpx;
	}

	.btnBlue1 {
		width: 288rpx;
		height: 46rpx;
		border-radius: 100rpx 100rpx 100rpx 100rpx;
		background: #0033FF;
	}
</style>